<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the pop method from the NavigatorExtState class, for the Dart programming language.">
  <title>pop method - NavigatorExtState class - boost_container library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../../static-assets/github.css?v1">
  <link rel="stylesheet" href="../../static-assets/styles.css?v1">
  <link rel="icon" href="../../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">flutter_boost</a></li>
    <li><a href="../../boost_container/boost_container-library.html">boost_container</a></li>
    <li><a href="../../boost_container/NavigatorExtState-class.html">NavigatorExtState</a></li>
    <li class="self-crumb">pop&lt;<wbr><span class="type-parameter">T extends Object</span>&gt; method</li>
  </ol>
  <div class="self-name">pop</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-method">pop&lt;<wbr><span class="type-parameter">T extends Object</span>&gt;</span> method 
</h1></div>

    <section class="multi-line-signature">
      
<div>
  <ol class="annotation-list">
    <li>@<a href="https://api.flutter.dev/flutter/dart-core/override-constant.html">override</a></li>
  </ol>
</div>

<span class="returntype">void</span>
<span class="name ">pop</span>&lt;<wbr><span class="type-parameter">T extends Object</span>&gt;(<wbr><ol class="parameter-list"><li><span class="parameter" id="pop-param-result">[<span class="type-annotation">T</span> <span class="parameter-name">result</span>]</span></li>
</ol>)

      <div class="features">override</div>

    </section>
    
<section class="desc markdown">
  <p>Pop the top-most route off the navigator.</p>
<p>The current route's <a href="https://api.flutter.dev/flutter/widgets/Route/didPop.html">Route.didPop</a> method is called first. If that method
returns false, then the route remains in the <a href="https://api.flutter.dev/flutter/widgets/Navigator-class.html">Navigator</a>'s history (the
route is expected to have popped some internal state; see e.g.
<a href="https://api.flutter.dev/flutter/widgets/LocalHistoryRoute-mixin.html">LocalHistoryRoute</a>). Otherwise, the rest of this description applies.</p>
<p>If non-null, <code>result</code> will be used as the result of the route that is
popped; the future that had been returned from pushing the popped route
will complete with <code>result</code>. Routes such as dialogs or popup menus
typically use this mechanism to return the value selected by the user to
the widget that created their route. The type of <code>result</code>, if provided,
must match the type argument of the class of the popped route (<code>T</code>).</p>
<p>The popped route and the route below it are notified (see <a href="https://api.flutter.dev/flutter/widgets/Route/didPop.html">Route.didPop</a>,
<a href="https://api.flutter.dev/flutter/widgets/Route/didComplete.html">Route.didComplete</a>, and <a href="https://api.flutter.dev/flutter/widgets/Route/didPopNext.html">Route.didPopNext</a>). If the <a href="https://api.flutter.dev/flutter/widgets/Navigator-class.html">Navigator</a> has any
<a href="https://api.flutter.dev/flutter/widgets/Navigator/observers.html">Navigator.observers</a>, they will be notified as well (see
<a href="https://api.flutter.dev/flutter/widgets/NavigatorObserver/didPop.html">NavigatorObserver.didPop</a>).</p>
<p>The <code>T</code> type argument is the type of the return value of the popped route.</p>
<p>The type of <code>result</code>, if provided, must match the type argument of the
class of the popped route (<code>T</code>).</p>
<p>{@tool snippet}</p>
<p>Typical usage for closing a route is as follows:</p>
<pre class="language-dart"><code class="language-dart">void _handleClose() {
  navigator.pop();
}
</code></pre>
<p>{@end-tool}
{@tool snippet}</p>
<p>A dialog box might be closed with a result:</p>
<pre class="language-dart"><code class="language-dart">void _handleAccept() {
  navigator.pop(true); // dialog returns true
}
</code></pre>
<p>{@end-tool}</p>
</section>


    
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">@override
void pop&lt;T extends Object&gt;([T result]) {
  &#47;&#47; Taking over container page
  if (!canPop()) {
    BoostNavigator.instance.pop(result);
  } else {
    super.pop(result);
  }
}</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../../index.html">flutter_boost</a></li>
  <li><a href="../../boost_container/boost_container-library.html">boost_container</a></li>
  <li><a href="../../boost_container/NavigatorExtState-class.html">NavigatorExtState</a></li>
  <li class="self-crumb">pop&lt;<wbr><span class="type-parameter">T extends Object</span>&gt; method</li>
</ol>


    <h5>NavigatorExtState class</h5>
    <ol>

    <li class="section-title"><a href="../../boost_container/NavigatorExtState-class.html#constructors">Constructors</a></li>
    <li><a href="../../boost_container/NavigatorExtState/NavigatorExtState.html">NavigatorExtState</a></li>


    <li class="section-title inherited">
      <a href="../../boost_container/NavigatorExtState-class.html#instance-properties">Properties</a>
    </li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/RestorationMixin/bucket.html">bucket</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/context.html">context</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/focusScopeNode.html">focusScopeNode</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/mounted.html">mounted</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/overlay.html">overlay</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorationId.html">restorationId</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/RestorationMixin/restorePending.html">restorePending</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/userGestureInProgress.html">userGestureInProgress</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/userGestureInProgressNotifier.html">userGestureInProgressNotifier</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/widget.html">widget</a></li>

    <li class="section-title"><a href="../../boost_container/NavigatorExtState-class.html#instance-methods">Methods</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/build.html">build</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/canPop.html">canPop</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/TickerProviderStateMixin/createTicker.html">createTicker</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/deactivate.html">deactivate</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/TickerProviderStateMixin/debugFillProperties.html">debugFillProperties</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/didChangeDependencies.html">didChangeDependencies</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/didStartUserGesture.html">didStartUserGesture</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/didStopUserGesture.html">didStopUserGesture</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/didToggleBucket.html">didToggleBucket</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/RestorationMixin/didUpdateRestorationId.html">didUpdateRestorationId</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/didUpdateWidget.html">didUpdateWidget</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/dispose.html">dispose</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/finalizeRoute.html">finalizeRoute</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/initState.html">initState</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/maybePop.html">maybePop</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li><a href="../../boost_container/NavigatorExtState/pop.html">pop</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/popAndPushNamed.html">popAndPushNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/popUntil.html">popUntil</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/push.html">push</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/pushAndRemoveUntil.html">pushAndRemoveUntil</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/pushNamed.html">pushNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/pushNamedAndRemoveUntil.html">pushNamedAndRemoveUntil</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/pushReplacement.html">pushReplacement</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/pushReplacementNamed.html">pushReplacementNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/reassemble.html">reassemble</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/RestorationMixin/registerForRestoration.html">registerForRestoration</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/removeRoute.html">removeRoute</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/removeRouteBelow.html">removeRouteBelow</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/replace.html">replace</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/replaceRouteBelow.html">replaceRouteBelow</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePopAndPushNamed.html">restorablePopAndPushNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePush.html">restorablePush</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePushAndRemoveUntil.html">restorablePushAndRemoveUntil</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePushNamed.html">restorablePushNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePushNamedAndRemoveUntil.html">restorablePushNamedAndRemoveUntil</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePushReplacement.html">restorablePushReplacement</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorablePushReplacementNamed.html">restorablePushReplacementNamed</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorableReplace.html">restorableReplace</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restorableReplaceRouteBelow.html">restorableReplaceRouteBelow</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/NavigatorState/restoreState.html">restoreState</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/State/setState.html">setState</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/Diagnosticable/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html">toString</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/Diagnosticable/toStringShort.html">toStringShort</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/RestorationMixin/unregisterFromRestoration.html">unregisterFromRestoration</a></li>

    <li class="section-title inherited"><a href="../../boost_container/NavigatorExtState-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>




</ol>

  </div><!--/.sidebar-offcanvas-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    flutter_boost
      3.0.0
  </span>

  
</footer>



<script src="../../static-assets/highlight.pack.js?v1"></script>
<script src="../../static-assets/script.js?v1"></script>



</body>

</html>

